import java.util.ArrayList;
import java.util.List;


public class Player {
	
	private List<Card> hand;
	private int seat;
	
	public Player(int seat) {
		hand = new ArrayList<Card>(); // Making player's hand an ArrayList instead of generic List
		this.seat = seat;
	}
	
	/*
	 * Returns a copy of the player's hand
	 */
	public List<Card> getHand() {
		List<Card> copyOfHand = new ArrayList<Card>(hand);
		return copyOfHand;
	}
	
	/*
	 * Adds a card to the player's hand
	 */
	public void addCard(Card newCard) {
		hand.add(newCard);
	}
	
	/*
	 * Returns the Card at the given index but leaves it in the hand
	 */
	public Card getCard(int indexOfCard) {
		return hand.get(indexOfCard);
	}
	
	/*
	 * Removes the Card at the given index from the hand and returns it
	 */
	public Card removeCard(int indexOfCard) {
		return hand.remove(indexOfCard);
	}
	
	/*
	 * Removes the given Card from the hand
	 */
	public void removeCard(Card card) {
		hand.remove(card);
	}
	
	/*
	 * Returns the seat number at which this player is sitting
	 */
	public int getSeat() {
		return seat;
	}

}
